package org.secangkirkopipanas.gxtcore.server.service.impl;

import java.util.List;

import org.secangkirkopipanas.gxtcore.common.exception.DataNotFoundException;
import org.secangkirkopipanas.gxtcore.server.dao.ISystemUserDAO;
import org.secangkirkopipanas.gxtcore.server.domain.SystemUser;
import org.secangkirkopipanas.gxtcore.server.service.ISystemUserService;

public class SystemUserService implements ISystemUserService {

	private ISystemUserDAO systemUserDAO;

	public ISystemUserDAO getSystemUserDAO() {
		return systemUserDAO;
	}

	public void setSystemUserDAO(ISystemUserDAO systemUserDAO) {
		this.systemUserDAO = systemUserDAO;
	}

	public void add(SystemUser systemUser) {
		systemUserDAO.add(systemUser);
	}

	public void delete(SystemUser systemUser) throws DataNotFoundException {
		systemUserDAO.delete(systemUser);
	}

	public void delete(String username) throws DataNotFoundException {
		systemUserDAO.delete(username);
	}

	public SystemUser get(String username) {
		return systemUserDAO.get(username);
	}

	public SystemUser get(String username, String pwdDigest) {
		return systemUserDAO.get(username, pwdDigest);
	}

	public List<SystemUser> getForList() {
		return systemUserDAO.getForList();
	}

	public int getTotalCount() {
		return systemUserDAO.getTotalCount();
	}

}
